#include <stdio.h>

int main() {
    float baseSalary = 500;  
    float profit, commission = 0, totalSalary;

    printf("请输入工程利润p(元):");
    scanf("%f", &profit);
    if (profit <= 1000) {
        commission = 0;
    } else if (profit > 1000 && profit <= 2000) {
        commission = profit * 0.1;
    } else if (profit > 2000 && profit <= 5000) {
        commission = profit * 0.15;
    } else if (profit > 5000 && profit <= 10000) {
        commission = profit * 0.2;
    } else {
        commission = profit * 0.25;
    }

    totalSalary = baseSalary + commission;
    printf("提成：%.2f元，月工资总额：%.2f元\n", commission, totalSalary);

    return 0;
}